package com.ruoyi.admin.controller;


import com.ruoyi.admin.domain.Schedule;
import com.ruoyi.admin.domain.dto.CourseScheduleDto;
import com.ruoyi.admin.service.IIndexService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

import static com.ruoyi.common.core.domain.AjaxResult.success;

@RestController
public class IndexController {
    @Resource
    private IIndexService iIndexService;

    @GetMapping("/lab/index/{week}/{dayOfWeek}")
    public AjaxResult getIndex(@PathVariable Integer week,@PathVariable Integer dayOfWeek)
    {
        CourseScheduleDto courseScheduleDto=new CourseScheduleDto(week,dayOfWeek,Long.valueOf(1));
        List<Schedule> list = iIndexService.getCourse(courseScheduleDto);
        return success(list);
    }

}

